<template>
  <div class="w-full h-full">
    1234 455 456<VueFlow
      v-model:nodes="nodes"
      v-model:edges="edges"
      :style="{ background: 'white' }"
    />
  </div>
</template>

<script setup>
  import { ref } from 'vue'
  import { VueFlow } from '@vue-flow/core'

  const nodes = ref([
    { id: '1', type: 'input', label: 'Node 1', position: { x: 250, y: 5 } },
    {
      id: '2',
      label: 'Node 2',
      position: { x: 100, y: 100 },
      style: { backgroundColor: 'green', width: '200px', height: '100px' },
    },
    { id: '3', label: 'Node 3', position: { x: 400, y: 100 } },
    { id: '4', label: 'Node 4', position: { x: 400, y: 200 }, class: 'my-custom-node-class' },
  ])

  const edges = ref([
    { id: 'e1-2', source: '1', target: '2', animated: true },
    { id: 'e1-3', source: '1', target: '3' },
    { id: 'e1-4', source: '3', target: '4', animated: true },
  ])
</script>
<style scoped lang="less">
  :deep(.vue-flow__node) {
    color: red;
  }

  :deep(.my-custom-node-class) {
    background-color: purple;
  }

  :deep(.vue-flow__handle-bottom) {
    background: green;
  }
</style>
